import {TransformOptions} from "@babel/core";

export default function (): TransformOptions {
  return {
    configFile: false,
    babelrc: false,
    presets: [
      ["@babel/preset-env", {
        "modules": false //关闭 Babel 的模块转换功能，保留原本的 ES6 模块化语法
        //     //默认是auto，取值还可以是 amd, umd, systemjs, commonjs，auto等
      }],
      ['@babel/preset-typescript']
    ],
    plugins: [
      ["@babel/plugin-proposal-private-methods", { "loose": true }],
      ["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
      ["@babel/plugin-proposal-decorators", {"legacy": true}],
      ["@babel/plugin-proposal-class-properties", {"loose": true}],
    ]
  }
}
